package com.zhenzhen.xszhcp.serviceImpl;

import com.zhenzhen.xszhcp.mapper.KechengMapper;
import com.zhenzhen.xszhcp.model.Kecheng;
import com.zhenzhen.xszhcp.service.KechengService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
@Component
public class KechengServiceImpl implements KechengService {
    @Autowired
    private KechengMapper mapper;
    @Override
    public List<Kecheng> getKechengList(Map paramMap) {
        return mapper.getKechengList(paramMap);
    }

    @Override
    public Kecheng getKechengById(int id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertKecheng(Kecheng kecheng) {
        return mapper.insertSelective(kecheng);
    }

    @Override
    public int delKecheng(int id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int upKecheng(Kecheng kecheng) {
        return mapper.updateByPrimaryKeySelective(kecheng);
    }

    @Override
    public List<Kecheng> getKechengListteacher(Map paramMap) {
        return mapper.getKechengListteacher(paramMap);
    }
}
